﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.Quality.TransformHtml
{
    public static class TableClassrereFlex
    {
        public const string TableClassNameSpace = "Camc.Quality.RecordTable.FormEntity";
        public static List<string> GetTableClassName()
        {
            List<string> SingleClassName = new List<string> { "视频", "制造资源", "工步签署表", "质量控制记录表", "装入件明细", "通用多媒体记录表", "传感器变换器对应关系记录表" ,"图表"};
            List<string> strList = new List<string>();
            var classes = Assembly.GetExecutingAssembly().GetTypes().ToList();

            classes = classes.Where(t => t.Namespace == TableClassNameSpace && !t.FullName.Contains("+")).ToList();

            foreach (var item in classes)
            {
                if (!item.Name.Contains("_"))
                {
                    //var act =Assembly.GetExecutingAssembly().CreateInstance(item.FullName);
                    strList.Add(item.Name);
                }
            }
            List<string> Result = strList.Union(SingleClassName).ToList<string>();
            return Result;
        }
    }
}

